home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / mach_doc.zip / MACH.DOC next >
Text File  |  1992-12-29  |  19KB  |  369 lines

  1.                            M I C R O K E R N E L
  2.  
  3.                             T E C H N O L O G Y
  4.  
  5.  
  6.  
  7.                    "A modular, portable software kernel
  8.                  promising powerful open systems advantages
  9.                    for system developers and end users."
  10.  
  11.  
  12.                                    I B M
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20. MICROKERNEL TECHNOLOGY
  21.  
  22.    Dramatic advances in computing architecture, hardware designs,and
  23. technology have spawned an amazing variety of programming methods, 
  24. user interfaces, development tools, communications techniques and
  25. application software.  Delivering previously unheard of advantages to
  26. end users in performance, service level, and system utility, the
  27. overwhelming diversity of system offerings has also heralded the cry
  28. for "open systems" & "standards".
  29.   
  30.    IBM, long a leader in creating new systems delivering the
  31. broadest range of application capabilities to the widest range of
  32. users, is again committed to developing the new, open, technologies
  33. needed for the next computing decade.
  34.  
  35.    IBM developers have begun to prototype the next generation of 
  36. highly portable systems software, and related applications, around a
  37. microkernel.  A microkernel provides a new way of structuring systems
  38. software to reduce it's complexity and to increase it's portability. 
  39. It presents the potential for building a single, truly open, computing
  40. environment: using a microkernel "core" product executing multiple
  41. diverse operating systems as "applications" on a single hardware
  42. platform.  The promise of microkernel-based system software lies in
  43. providing better ways to cope with the increasing complexity of system
  44. designs, the potential for systems software to be more "in tune" with
  45. the startling leaps forward in processor hardware, and ultimately, the
  46. ability of the end user to select the best available application...  
  47. independent of the available processor.
  48.  
  49.    Systems built using microkernel technology will deliver a new 
  50. standard for modular, portable, operating systems development 
  51. platforms.  Rather than creating a single, monolithic system, 
  52. developers create a set of servers that can be configured in a
  53. variety of ways to provide the target operating system.           (1)
  54.  
  55.     One of the most discussed advances in operating systems in recent 
  56. years, is the microkernel - a small, message-based piece of systems 
  57. software running in the most privileged state of the computer, 
  58. supporting the rest of the operating system as a set of server 
  59. applications.  Interest in microkernels has grown as system developers
  60. have reacted to the complexity of current operating system 
  61. implementations and as the research community has demonstrated the 
  62. feasibility of the microkernel concept.
  63.  
  64.    The Mach microkernel technology developed at Carnegie Mellon 
  65. University serves as the basis for IBM's microkernel work.  On the 
  66. Mach base IBM is experimenting with new ways of implementing low-end 
  67. environments, developing stand-alone file servers, integrating
  68. multiple operating system personalities on a single computer, and 
  69. enabling new ways of delivering DOS execution environments.
  70.  
  71.    By virtue of their size and their ability to support standard 
  72. programming services and features as application programs, micro-
  73. kernels themselves are simpler than standard operating systems.  With 
  74. a microkernel, operating system function is broken down into modular 
  75. pieces that may be configured in a variety of ways, permitting larger 
  76. systems to be built by adding pieces to smaller ones.  Microkernels 
  77. also make it easier to support multiprocessors by creating a standard 
  78. programming environment that can use multiple processors if they are 
  79. present but does not require them.  The specialized code for 
  80. multiprocessors is restricted to the microkernel itself.  Moreover, 
  81. networks of communicating microkernels can be used to provide 
  82. operating system support for the emerging class of massively parallel 
  83. machines.  Since they are small and have relatively little kernel- 
  84. level code to execute, microkernels provide a convenient way to 
  85. support the real-time features needed for multimedia, device control 
  86. and high speed communications.  Finally, well structured microkernels 
  87. provide an insulating layer for hardware differences that are not 
  88. masked by the use of higher level programming languages.  Thus, they 
  89. make porting code easier and increase code reuse.
  90.  
  91.    Current Mach research and development activities include on-going 
  92. research work at Carnegie Mellon, as well as Mach-related work at the 
  93. University of Utah, the University of Arizona and Cornell University. 
  94. The Open Software Foundation Research Institute, building on it's 
  95. previous work and research done at Carnegie Mellon has created a 
  96. version of Mach that supports massively parallel supercomputers. 
  97. There is also work underway at the Center for High Performance 
  98. Computing of Worchester Polytechnic Institute on real-time
  99. extensions and file system servers for a Mach environment.        (2)
  100.  
  101.  
  102.    +------------------------------+  +------------------------------+
  103.    |                              |  |                              |
  104.    |                              |  |                              |
  105.    |    Dominant Personality      |  |     Secondary Personality    |
  106.    |        Applications          |  |          Applications        |
  107.    |                              |  |                              |
  108.    |           (MIC)              |  |             (MIC)            |
  109.    +------------------------------+  +------------------------------+
  110.  
  111.    ==================================================================
  112.                    "True Application"/Server Boundry
  113.    ==================================================================
  114.  
  115.    +------------------------------+  +-------------+  +-------------+
  116.    |                              |  |             |  |             |
  117.    |    Dominant Personality      |  |  Secondary  |  |  Secondary  |
  118.    |           Server             |  | Personality |  | Personality |
  119.    |                              |  |   Server    |  |   Server    |
  120.    |           (MIC)              |  |   (MIC)     |  |   (MIC)     |
  121.    +------------------------------+  +-------------+  +-------------+
  122.  
  123.    ==================================================================
  124.               Personality/Personality-Independent Boundry
  125.    ==================================================================
  126.  
  127.    +--------+  +--------+  +----------+  +---------+     +----------+
  128.    |        |  |        |  |          |  |         |   +-+--------+ |
  129.    | Master |  |  File  |  | Hardware |  | Default |   |  Device  | |
  130.    | Server |  | Server |  | Resource |  |  Pager  |   |  Drivers | |
  131.    |        |  |        |  | Manager  |  |         |   |          | |
  132.    |  (MIC) |  |  (MIC) |  |  (MIC)   |  |  (MIC)  |   |  (DDC)   |-+
  133.    +--------+  +--------+  +----------+  +---------+   +----------+
  134.  
  135.    ==================================================================
  136.                        User/Privileged Boundary
  137.    ==================================================================
  138.  
  139.    +-----------+----------------------------------------+-----------+
  140.    |           |    Enhanced Mach 3.0 Microkernel       |           |
  141.    |           |                                        |           |
  142.    |           |       |               |                |           |
  143.    |  Virtual  |  IPC  |  I/O Support  |   Host and     | Tasks &   |
  144.    |  Memory   |       |  & Interrupts | Processor Sets | Threads   |
  145.    |           |       |               |                |           |
  146.    |   (MIC)   | (MIC) |     (MIC)     |      (MIC)     |   (MIC)   |
  147.    +-----------+-------+---------------+----------------+-----------+
  148.    |   (MDC)   | (MCD) |     (MDC)     |      (MDC)     |   (MDC)   |
  149.    +-----------+-------+---------------+----------------+-----------+
  150.  
  151.                    (MIC) - Machine-Independent Code
  152.                    (DDC) - Device-Dependent Code
  153.                    (MDC) - Machine-Dependent Code                 (3)
  154.  
  155.  
  156. THE MACH ARCHITECTURE
  157.  
  158.    The functions performed by the Mach microkernel itself are limited 
  159. to reduce its size and to maximize the amount of code that runs as an 
  160. application program.  The microkernel includes only those functions 
  161. that are required to define a set of abstract processing environments 
  162. for application programs and to permit applications to work together 
  163. to deliver services and to act as clients and servers.  As a result, 
  164. the microkernel provides only five different types of services.
  165.  
  166.       *  virtual memory management
  167.  
  168.       *  tasks and threads
  169.  
  170.       *  interprocess communications (IPC)
  171.  
  172.       *  I/O support and interrupt management
  173.  
  174.       *  host and processor set services
  175.  
  176.    Other operating system functions such as file systems, device 
  177. support and traditional programming interfaces are placed into one or 
  178. more server application programs.  The enclosed diagram illustrates 
  179. this function split by showing how IBM is using Mach to support an 
  180. experimental low-end version of AIX* for PS/2* and other Intel386* and
  181. Intel486* based hardware.
  182.  
  183.  
  184. MACH TECHNOLOGY OVERVIEW
  185.  
  186.    The virtual memory component of the Mach microkernel supports 
  187. large, paged, sparse address spaces that are composed of memory 
  188. objects.  Each memory object is managed by a memory pager, a task 
  189. outside the kernel that provides the backing storage for the pages of 
  190. the memory object.  Address spaces are manages by mappings or
  191. allocating memory objects within them.  Mach manages memory protection
  192. and sharing on a memory object basis in an abstract way, independent 
  193. of any particular processor address translation hardware.  In 
  194. particular, Mach makes heavy use of copy-on-write to permit programs 
  195. to share memory objects without copying large numbers of pages when a 
  196. new address space accesses the memory object.  New copies of the page 
  197. are created only when a program in one of the address spaces updates 
  198. them.  When Mach takes a page fault in a memory object and does not 
  199. have the page in memory or when it has to remove pages from memory due
  200. to the requirements of other programs executing on the machine, it 
  201. notifies the pager for the memory object in which the fault occurs 
  202. using the IPC mechanism.  It is then up to the pager, an application 
  203. server, to determine how to provide or to store the data.  This 
  204. permits the system to define different semantics for the memory 
  205. objects based on the needs of the programs that use them.  The default
  206. pager shown in the diagram provides a pager for the memory objects
  207. that do not require anything other than the usual semantics of
  208. virtual memory.                                                   (4)
  209.  
  210.    Mach manages the execution environments for the programs by 
  211. providing multiple tasks and threads.  Each Mach task has it's own 
  212. address space, or map.  It assigns memory objects that the task has 
  213. mapped to ranges of addresses within the address space.  The task is 
  214. also the unit of resource allocation and protection in Mach with tasks
  215. being assigned capabilities and access rights to the IPC facilities of
  216. the system.  In order to support parallel execution by a program 
  217. within a single address space, Mach separates the execution 
  218. environment from the actual running of streams of instructions.  The 
  219. streams of computation including the processor resources needed to 
  220. support them are called threads.  Thus, a program can be loaded into a
  221. Mach task and can be executed in several different places in the code 
  222. at the same time on a multiprocessor or parallel machine.  This can 
  223. result in better application performance.
  224.  
  225.    The Mach IPC system provides the basic mechanism that allows 
  226. threads running in different tasks to communicate with each other. 
  227. The IPC system supports the reliable delivery of messages on ports. 
  228. Ports are protected channels between tasks.  Each task that uses a 
  229. port is assigned a set of rights to that port.  These rights may be 
  230. different for different tasks.  Only one task can receive on any port 
  231. although any thread within the task may execute the receive operation. 
  232. One or more tasks may hold rights to send to a port.  The kernel 
  233. permits tasks to use the IPC system to transfer port rights among 
  234. themselves.  It also provides a high performance way of passing large 
  235. data areas in messages.  Rather than copying the data, the message 
  236. contains a pointer to it: this is called a pointer to out-of-line 
  237. data.  When the kernel transfers the message from the sender to the 
  238. receiver, it makes the memory being passed disappear form the sender's
  239. address space and appear in the receiver's address space.  One 
  240. interesting aspect of the Mach is that the microkernel itself is 
  241. structured internally as a task with threads, and most of the Mach 
  242. system services are implemented as IPCs to the kernel rather than as 
  243. direct system calls.
  244.  
  245.    In order to support I/O and device access, the microkernel provides 
  246. access to I/O resources such as memory-mapped devices, I/O ports and 
  247. direct memory access (DMA) channels, as well as the ability to reflect
  248. interrupts to device drivers executing in user space.  Mach has 
  249. services that let privileged programs acquire ownership of devices: 
  250. these programs are typically device driver servers running as 
  251. applications as shown in the diagram.  Since the microkernel must 
  252. field all interrupts (because interrupts are typically delivered into 
  253. the privileged state of the computer and in order to maintain the 
  254. integrity of the system), it has logic that determines whether it 
  255. should process the interrupt or reflect it to a server.  If the 
  256. interrupt is to be reflected to an application, it must have 
  257. registered with the kernel and contain code that waits for the kernel 
  258. to reflect the interrupt.  When the interrupt is reflected, a thread 
  259. in the application begins running to process the interrupt.
  260.                                                                   (5)
  261.  
  262.    Mach's host and processor set features provide two related sets of 
  263. functions that are needed if application programs are to provide most 
  264. operating system services.  The host features return information about
  265. the processor complex running the system and provide certain system 
  266. management functions such as time, date, and system stop and restart. 
  267. The processor set features are used on multiprocessor machines to 
  268. group processors in classes.  These classes permit a parallel 
  269. application to execute multiple threads simultaneously on different 
  270. processors in the same machine so that true parallel execution occurs.
  271.  
  272.    The diagram also shows that Mach carefully splits its 
  273. implementation into code that is completely portable from machine to 
  274. machine and code that is dependent on the particular machine on which 
  275. it is executing.  It also segregates the code that depends on devices 
  276. into the device drivers: however, the device driver code, while 
  277. device-dependent, is not necessarily dependent on the processor 
  278. architecture.  Using multiple threads per task, Mach provides an 
  279. application environment that permits the use of multiprocessors 
  280. without requiring that any particular machine be a multiprocessor: on 
  281. uniprocessors different threads simply run at different times.  All of
  282. the support needed for multiprocessors is concentrated into the 
  283. relatively small and simple microkernel.
  284.  
  285.  
  286. OPERATING SYSTEMS AS APPLICATION SERVERS
  287.  
  288.    Sitting immediately on top of the microkernel are a number of 
  289. application servers that provide general purpose system services. 
  290. These programs are called personality-independent servers since they 
  291. depend only on the microkernel and themselves.  Among the personality-
  292. independent servers are the default pager, the hardware resource 
  293. manager that assigns device hardware to device drivers, the master 
  294. server that loads other personality-independent servers into memory, 
  295. the the device drivers and possibly a general purpose file server. 
  296. The microkernel and the personality-independent servers can be 
  297. packaged as a product separate from any operating system.
  298.  
  299.    Using the services of the microkernel and the 
  300. personality-independent servers, the dominant personality provides a 
  301. standard operating system such as AIX.  Since the dominant personality
  302. is an application server, it is possible to have multiple servers for 
  303. different personalities executing programs written to different 
  304. operating systems running on the machine at the same time.  However, 
  305. there are some operating system services such as error message 
  306. translation that are not provided in the personality-independent 
  307. servers.  Since it is best not to duplicate such services, the dominant
  308. personality provides them not only to its client applications but also
  309. to any other personalities running on the machine.  For instance, the 
  310. low-end AIX implementation on Mach currently runs as a dominant 
  311. personality and supports an environment for running DOS programs
  312. as a secondary personality.                                       (6)
  313.  
  314.  
  315. BENEFITS FOR DEVELOPERS AND USERS
  316.  
  317.    Mach represents enabling technology for system developers rather 
  318. than a revolution for the end user.  The modular, scalable, portable 
  319. environment of Mach permits the system developer to create new system 
  320. functions as applications rather than within the kernel.  It lets 
  321. hardware developers write device drivers as applications and makes 
  322. porting the system to new platforms a relatively small and very well- 
  323. understood job.  But there are some real benefits to the end user. 
  324. The customer now has a choice: applications written to different 
  325. operating systems can execute together on the same machine permitting 
  326. the use of exactly the right set of programs for a particular business
  327. or organization.  Mach reduces the time it takes system developers to 
  328. create new software functions or to use new hardware functions, 
  329. providing the end user with better technology more rapidly than in the
  330. past.  Finally, Mach permits the end user to benefit from the 
  331. emergence of parallel processing and the notions of object-oriented 
  332. programming by providing a system that allows applications to use 
  333. parallelism and that breaks traditional operating systems up into 
  334. modular pieces to which object-oriented implementation techniques can 
  335. be applied.
  336.  
  337. Copyright IBM Corporation 1992 All Rights Reserved
  338.  
  339. AIX & PS/2 are registered trademarks of IBM Corporation
  340. UNIX is a registered trademark of UNIX System Laboratories, Inc.
  341. Intel386 & Intel486 are trademarks of Intel Corporation
  342.  
  343. Thanks to Fred Sawicki for supplying this document.
  344.  
  345. Transcribed by F. Robert Falbo   Internet: falbof@c3dt3.c3d.rl.af.mil
  346.  
  347.  
  348. ------------------------------ notes --------------------------------
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.                                                                   (7)
  369.